<?php
/**
 * Created by PhpStorm.
 * User: Chris
 * Date: 14-3-23
 * Time: 下午8:32
 */

return array(

    /**
     * DB connection, leave null to use default
     */
//    'db_connection' => null,
    'db_connection' => 'master_db',

    /**
     * DB table name for the user table
     */
    'table_name' => 'admin_user',

    /**
     * Choose which columns are selected, must include: username, password, email, last_login,
     * login_hash, group & profile_fields
     */
    'table_columns' => array('*'),
    /*'table_columns' => array('username', 'password', 'email', 'last_login',
        'login_hash', 'user_group' , 'profile_fields'),*/

    /**
     * This will allow you to use the group & acl driver for non-logged in users
     */
    'guest_login' => false,

    /**
     * This will allow the same user to be logged in multiple times.
     *
     * Note that this is less secure, as session hijacking countermeasures have to
     * be disabled for this to work!
     */
    'multiple_logins' => false,

    /**
     * Groups as id => array(name => <string>, roles => <array>)
     */
    'groups' => array(
        /**
         * Examples
         * ---
         *
         * -1   => array('name' => 'Banned', 'roles' => array('banned')),
         * 0    => array('name' => 'Guests', 'roles' => array()),
         * 1    => array('name' => 'Users', 'roles' => array('user')),
         * 50   => array('name' => 'Moderators', 'roles' => array('user', 'moderator')),
         * 100  => array('name' => 'Administrators', 'roles' => array('user', 'moderator', 'admin')),
         */
        '100' => array('name'=>'系统管理组', 'roles'=>array(
            'admin', 'useradmin', 'activityadmin'
            )
        )
    ),

    /**
     * Roles as name => array(location => rights)
     */
    'roles' => array(
        /**
         * Examples
         * ---
         *
         * Regular example with role "user" given create & read rights on "comments":
         *   'user'  => array('comments' => array('create', 'read')),
         * And similar additional rights for moderators:
         *   'moderator'  => array('comments' => array('update', 'delete')),
         *
         * Wildcard # role (auto assigned to all groups):
         *   '#'  => array('website' => array('read'))
         *
         * Global disallow by assigning false to a role:
         *   'banned' => false,
         *
         * Global allow by assigning true to a role (use with care!):
         *   'super' => true,
         */
        'admin'=>array(
            'super'=>true
        ),
        'useradmin'=>array(
            'adminuser'=>array('read', 'write', 'resetpassword'),
            'user'=>array('read','write')
        ),
        'activityadmin'=>array(
            'activity'=>array('read','write')
        ),

        'matcheditor'=>array(
            'user'=>array('read'),
            'match'=>array('read'),
            'matchlive'=>array('read','write')
        )

    ),

    /**
     * Salt for the login hash
     */
    'login_hash_salt' => 'Th1s=mY0Wn_$@|+',

    /**
     * $_POST key for login username
     */
    'username_post_key' => 'username',

    /**
     * $_POST key for login password
     */
    'password_post_key' => 'password',
);
